<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" type="text/css" href="../css/index.css" />
		<script type="text/javascript" src="../js/vue.min.js"></script>
		<script type="text/javascript" src="../js/vant.min.js"></script>		
		<script src="../js/ajax.js"></script>
		<script src="html5plus://ready"></script>
		<script type="text/javascript" src="../js/back1.js"></script>
		<script src="../js/back.js"></script>
	</head>
	<body>
		 <div id="app">
			<van-row style="background-color: red;padding-top: 30px; ">
				<van-nav-bar style="background-color: red;height: 100%;" title="我的收藏" @click-left="onback1" left-arrow></van-nav-bar>
			</van-row>
			<div style="border-left:3px solid blue;margin-left: 5px;">
				<h2>收藏列表</h2>
				<div style="margin: 10px;" v-for="(item, index) in Goods" @click="clickSkip(index)">
				<!-- 跳转我的收藏 -->
				<van-row style="margin: 10px;"  >
					<van-col span="8">
						<img :src="item.GoodsImageUrl" width="90%" style="height: 100px;" onerror="this.src='../../../img/mai5.jpg'" />
					</van-col>
					<van-col span="16">
						<div style="font-size: 14px">{{item.Name}}</div>
						<div>
							<span style="color: red;font-size: 18px;"> ￥{{item.RealPrice}}</span>
							<span><em style="text-decoration: line-through;font-size: 12px;color: #C8C9CC;">价格￥{{item.MarketPrice}}</em></span>
						</div>
						<div>
							<span style="font-size: 12px;color: #C8C9CC; "> 累计销量{{item.VirtualSaleCount}}</span>
							<span style="float: right; font-size: 12px; color: #C8C9CC;"> {{item.BrowseCount}} 次浏览</span>
						</div>
					</van-col>
				</van-row>
			</div>		
			</div>
		</div>
		<script type="text/javascript">
			var vm=new Vue({
				el:"#app",
				data:{
					checked:false,
					key:"",
					Goods:""
				},
				methods:{
					onback1:function(){
						plus.webview.close(plus.webview.currentWebview().id);
					},	
				},
				mounted() {
					var _this=this;
					if(localStorage.getItem("key")!=null){
						_this.key=localStorage.getItem("key");
					}
						ajax({
							url:"http://dsapi.ysd3g.com/api/MyGoodsCollectList",
							dataType:"jsonp",
							data:{
								p:1,
								key:_this.key
							},
							success:function(res){
								if(res.Error==false){
									vm.Goods=res.Data;
								}else{
									vm.$toast.fail(res.Msg);
								}
								// console.log(res)
							}
						})
				}
			})
		</script>
	</body>
</html>
